from utils.BaseModel import BaseModel
from django.db import models


# Create your models here.

class Nav(BaseModel):
    name = models.CharField(max_length=20, verbose_name='导航名称', unique=True)
    url = models.CharField(max_length=200, verbose_name='导航链接', null=True, blank=True)
    position = models.IntegerField(verbose_name='导航位置', default=0)
    ishttp = models.BooleanField(verbose_name='是否为http链接', default=False)

    class Meta:
        db_table = 'fgnav'
        verbose_name = "导航"


class Banner(BaseModel):
    title = models.CharField(max_length=20, verbose_name="标题")
    img = models.CharField(max_length=200, verbose_name="图片")
    islink = models.BooleanField(verbose_name="是否是链接", default=False)
    url = models.CharField(max_length=200, verbose_name="链接", null=True, blank=True)

    class Meta:
        db_table = "fgbanner"
        verbose_name = "轮播图"



